package com.swotxu.mall.auth.feign;

import com.swotxu.common.utils.R;
import com.swotxu.mall.auth.vo.SocialUser;
import com.swotxu.mall.auth.vo.UserLoginVo;
import com.swotxu.mall.auth.vo.UserRegistVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @Date: 2021/2/17 22:19
 * @Author: swotXu
 */
@FeignClient("mall-member")
public interface MemberFeignService {

    /**
     * 注册用户
     * @return
     */
    @PostMapping("/member/member/regist")
    R regist(@RequestBody UserRegistVo memberRegistVo);

    /**
     * 用户登录
     * @return
     */
    @PostMapping("/member/member/login")
    R login(@RequestBody UserLoginVo loginVo);

    /**
     * 社交登录
     * @return
     */
    @PostMapping("/member/member/oauth2/login")
    R oauthLogin(@RequestBody SocialUser socialUser);
}
